package org.zjx.analysis.flag;

import org.zjx.core.IWindow;
import org.zjx.util.ImageUtil;

import java.awt.*;
import java.awt.image.BufferedImage;

public class FlagsCACAnalysis extends BaseFlagAnalysis{

    public FlagsCACAnalysis(IWindow window, BufferedImage screenshot) {
        super(window, screenshot);
    }

    @Override
    protected Rectangle getContentArea() {
        return ImageUtil.createRect(9, 35, 553, 310);
    }

    @Override
    protected Point getMapSize() {
        return  new Point(548,279);
    }

    @Override
    protected void initResources() {

    }

    @Override
    public Rectangle closeArea() {
        return ImageUtil.createRect(536, 8, 554, 26);
    }

    @Override
    public Rectangle getOriginBounds() {
        return ImageUtil.createRect(118, 140, 680, 458);
    }

    @Override
    public Rectangle getRefImageArea() {
        return ImageUtil.createRect(9, 35, 30, 50);
    }

    @Override
    public BufferedImage getRefImage() {
        String image = "iVBORw0KGgoAAAANSUhEUgAAABYAAAAQCAYAAAAS7Y8mAAABzklEQVR4XmVToVbEMBCsrKysQERGVFQgIhAViBOIyhMIBOIksgLJB5xAIPkABJ/An4WdyU4uvRPzmmY3k9ndSTcextzf9TeYjyEvb2Ou8WnII2D/w8NAhPuR+/0cytfXYY25QwI3GlIcBml8KiQ1PhVCxIG4RJLz8oYce50UtOQgTKdI1TtyB5TroqpawP4Ycnd9EIewtzyHnB6hqihUTIpBKOwqxtrUd+3tgNSuBpC3inAJRXgfEWOvsTZU1SRu1FCtHV62Oa/viX1uq0FM5AJEQcjxM12IDV18mXcH6QZTCnIcYOmIN0Ndt8A87UMEcmv1htpjqrG1iKGgJjsQA+n6ERnr+zLo7SdRCN3ile9agSQApKfvA/t2Pdiah6HaGrkAcmlBj3U85GXKXiKe15le3U0cuSD3tomYZ73/F+Kp+BEbGgS+IB1A7ITtBcql3ymgVKJ3wZfXDgekGhwGy8SW3L8gUmWchb9GVbN/0uY/JMluIqaX/cm2tsQQQYxvFeE2rK0AMTbUt/Sabp+rk6oV9LqJ0GwAcZWX55BatYKuUBsaYvVX/m2rhpjzllyx+REkKEeQfWhHtMGgMuuz93axAts7n5f897XkXxP2D0yLC8didJW1AAAAAElFTkSuQmCC";
        return ImageUtil.stringToBufferedImage(image);
    }
}
